<?php use_helper('I18N'); ?>
<style type="text/css">
    p img {
        background: none repeat scroll 0 0 white;
        border: 1px solid #BBBBBB;
        margin: 7px 14px 7px 0;
        padding: 5px;
        height: 50px;
        /*width: 160px;*/
    }
</style>
<script type="text/javascript">
    $(function() {
        $("#btnUpdate").button({
            icons: {
                primary: "ui-icon-disk"
            }
        });
    });
</script>
<div id="content">

<!-- ========== CATEGORIES TABS ========= -->
<!-- ==================================== -->
<table id="contentMainWrapper" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td id="column-left" style="width: 215px;">
    <div style="width:215px;">
        <!--// bof: categories //-->
        <div class="box" id="categories" style="width:215px;">
            <div class="box-border">
                <div class="box-head">
                    <?php echo __('Categories') ?>
                </div>
                <div class="box-body">
                    <?php include_component('component', 'categoriesSideMenu') ?>
                </div>
            </div>
        </div>
        <!--// eof: categories //-->
        <!--// bof: specials //-->
        <div class="box" id="specials" style="width:215px;">
            <div class="box-border">
                <div class="box-head">
                    <a href="<?php echo url_for("/product/specialItem") ?>"><?php echo __('Specials') ?></a>
                </div>
                <div class="box-body">
                    <?php include_component('component', 'specialsSideMenu', array('param' => 'will implement for categoryType')) ?>
                </div>

            </div>
        </div>
        <!--// eof: specials //-->
    </div>
</td>

<td id="column-center" valign="top">
    <div class="column-center-padding">
        <div class="centerColumn" id="productGeneral">
            <!--bof Product Name-->
            <?php
            $title = $cmsProduct->getProductName() . " #" . $cmsProduct->getProductCode();
            if ($sf_user->getCulture() == "cn") {
                $title = $cmsProduct->getProductNameCn() . " #" . $cmsProduct->getProductCode();
            }
            ?>
            <h1 id="productName" class="productGeneral"><?php echo $title; ?></h1>
            <!--eof Product Name-->
            <!--bof Form start-->
            <form name="writeReviewForm" action="/product/saveReview" method="post" enctype="multipart/form-data">
                <!--eof Form start-->
                <!--bof Category Icon -->
                <div id="categoryIcon" class="categoryIcon" align="left">
                    <div class="wrapper">
                        <div class="fleft aligncenter">
                            <?php
                                $categoryTitle = $cmsCategory->getCategoriesName();

                                if ($sf_user->getCulture()=="cn") {
                                    $categoryTitle = $cmsCategory->getCategoriesNameCn();
                                }
                            ?>
                            Category: <a href="<?php echo url_for("/product/categories?id=".$cmsCategory->getCategoriesId()) ?>" style="color: #8B8B8B; font-size: 14px">
                                <?php echo $categoryTitle; ?></a></div>
                    </div>
                </div>
                <!--eof Category Icon -->
                <!--bof Prev/Next top position -->
                <!--eof Prev/Next top position-->
                <!--bof Main Product Image -->
                <div id="productMainImage" class="centeredContent back">
                    <a href="<?php echo url_for("/product/item?id=" . $cmsProduct->getProductId()) ?>">
                        <img height="177" title="<?php echo $title; ?>" alt="<?php echo $title; ?>" src="/uploads/products/<?php echo $cmsProduct->getProductPhoto() ?>">
                    </a>
                </div>
                <!--eof Main Product Image-->

                <div class="forward">
                    <div class="buttonRow" id="reviewsWriteProductPageLink">
                        <a href="<?php echo url_for("/product/item?id=" . $cmsProduct->getProductId()) ?>" style="text-decoration: none">
                            <img src="/images/buttons/arrow-right.png"
                                alt="<?php echo __('Product Details') ?>"
                                title="<?php echo __('Product Details') ?>">&nbsp;<strong><?php echo __('Product Details') ?></strong>
                        </a>
                    </div>
                    <div class="buttonRow">
                        <a href="<?php echo url_for("/product/review?id=" . $cmsProduct->getProductId()) ?>" style="text-decoration: none">
                            <img src="/images/buttons/arrow-right.png"
                                alt="<?php echo __('Read The Review') ?>"
                                title="<?php echo __('Read The Review') ?>">&nbsp;<strong><?php echo __('Read The Review') ?></strong>
                        </a>
                    </div>
                </div>

                <!--bof Product Price block -->
                <h2 id="productPrices" class="productGeneral">
                    RM <?php echo number_format($cmsProduct->getPrice(), 2) ?></h2>
                <!--eof Product Price block -->
                <!--bof free ship icon  -->
                <!--eof free ship icon  -->
                <!--bof Product description -->
                <div id="productDescription" class="productGeneral biggerText">
                    <?php echo $cmsProduct->getProductDesc() ?>
                </div>
                <br><br clear="all">
                <!--   fancy box image lookup  -->
                <?php include_component('component', 'fancybox', array('param' => $cmsProduct->getProductId())) ?>
                <!--eof Product description -->
                <br class="clearBoth">

                <!--bof Product details list  -->
                <div id="reviewsWriteReviewsRate" class="center">Choose a ranking for this item. 1 star is the worst and 5 stars is the best.</div>

                <div class="ratingRow">
                <input type="radio" name="rating" value="1" id="rating-1" /><label class="" for="rating-1"><img src="/images/misc/stars_1.gif" alt="One Star" title=" One Star " width="86" height="16" /></label>
                <input type="radio" name="rating" value="2" id="rating-2" /><label class="" for="rating-2"><img src="/images/misc/stars_2.gif" alt="Two Stars" title=" Two Stars " width="86" height="16" /></label>
                <input type="radio" name="rating" value="3" id="rating-3" /><label class="" for="rating-3"><img src="/images/misc/stars_3.gif" alt="Three Stars" title=" Three Stars " width="86" height="16" /></label>
                <input type="radio" name="rating" value="4" id="rating-4" /><label class="" for="rating-4"><img src="/images/misc/stars_4.gif" alt="Four Stars" title=" Four Stars " width="86" height="16" /></label>
                <input type="radio" name="rating" value="5" id="rating-5" checked="checked"/><label class="" for="rating-5"><img src="/images/misc/stars_5.gif" alt="Five Stars" title=" Five Stars " width="86" height="16" /></label></div>

                <label id="textAreaReviews" for="review-text">Please tell us what you think and share your opinions with others. Be sure to focus your comments on the product.</label>

                <input type="hidden" name="productId" value="<?php echo $cmsProduct->getProductId()?>">
                <textarea name="reviews" cols="60" rows="5" id="review-text"></textarea>
                    <div class="buttonRow forward">
                        <button id="btnUpdate">Submit</button>
                    </div>
                <br class="clearBoth" />
            </form>
            <!--bof Form close-->
        </div>
        <div class="clear"></div>
        <!--eof content_center-->
    </div>
</td>
</tr>
</tbody>
</table>

</div>

<script type="text/javascript">
                <?php
                    echo "$('#disp_order').val('" . $sorting . "')";
                ?>
</script>